
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags" %>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName()+ path+"/" ;
%>
<!DOCTYPE HTML>

<html>
<head>
    <title>Oauth Approval</title>
    <base href="<%=basePath%>"/>
    <meta name="keywords" content="" />
  	<meta name="description" content="" />
  	<meta name="viewport" content="width=device-width">  
  	<link rel="stylesheet" type="text/css" href="css/bootstrap.min.css" />      
  	<link rel="stylesheet" type="text/css" href="css/templatemo_main.css">
</head>
<body>
<div class="form-horizontal templatemo-signin-form">
<div class="form-group">
          <div class="col-md-12" style="text-align: center;">
              <img src="images/logo.png"></img>
              <p>&nbsp;</p>
              <p>是否授权应用 '${param.client_id}' 访问您受保护的资源？</p>
          </div>
        </div>


<div class="form-group">
<form id='confirmationForm' name='confirmationForm' class='col-sm-6' style="text-align: center;" action='${pageContext.request.contextPath}/oauth/authorize' method='post'>
    <input type="hidden" name="client_id" value="${param.client_id}"/>
    <input type="hidden" name="scope" value="${param.scope}"/>
    <input type="hidden" name="response_type" value="${param.response_type}"/>
    <input type="hidden" name="redirect_uri" value="${param.redirect_uri}"/>
    <input type="hidden" name="state" value="${param.state}"/>
    <input type="hidden" name="client_secret" value="${param.client_secret}"/>

    <input name='user_oauth_approval' value='true' type='hidden'/>
    <label> <input value='授权' type='submit' class="btn btn-success"/></label>
</form>

<form id='denialForm' name='denialForm' class='col-sm-6' style="text-align: center;" action='${pageContext.request.contextPath}/oauth/authorize' method='post'>
    <input type="hidden" name="client_id" value="${param.client_id}"/>
    <input type="hidden" name="scope" value="${param.scope}"/>
    <input type="hidden" name="response_type" value="${param.response_type}"/>
    <input type="hidden" name="redirect_uri" value="${param.redirect_uri}"/>
    <input type="hidden" name="state" value="${param.state}"/>
    <input type="hidden" name="client_secret" value="${param.client_secret}"/>

    <input name='user_oauth_approval' value='false' type='hidden'/>
    <label><input value='拒绝' type='submit' class="btn btn-warning"/></label>
</form>
</div>
</div>
</body>
</html>